package com.lenin.omena.client.event;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.lenin.omena.shared.LoginResult;

public class TestEvent extends GwtEvent<TestEventHandler> {

	public static Type<TestEventHandler> TYPE = new Type<TestEventHandler>();

	public static HandlerRegistration register(final EventBus eventBus,
			final TestEventHandler handler) {

		return eventBus.addHandler(TestEvent.TYPE, handler);

	}


	public TestEvent() {
	}

	@Override
	public Type<TestEventHandler> getAssociatedType() {
		return TestEvent.TYPE;
	}

	@Override
	protected void dispatch(final TestEventHandler handler) {
		handler.onTest(this);
	}

}